package com.chen.dome12printStream;

import java.io.PrintStream;

public class printStreamdome1 {
    public static void main(String[] args) {
        try (
                PrintStream ps = new PrintStream("D:\\学生成绩管理系统\\javaprojectmax\\d2_file-io\\src\\ps.txt");
        ) {
            ps.print("hello");
            ps.println("world");
            ps.println(123);
            ps.println(true);
            ps.println(3.14);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
